<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			// 1.方法1
			var fun1 = new Function("a", "b", "c", "alert(a)");
			fun1(1, 2, 3);
			//2.方法2
			function fun2(a, b) {
				alert(a + b);
			}
			fun2(3, 4);
			//3.方法3
			var fun3 = function(a, b) {
				alert(a + b);
			}
			fun3(10, 100);

			// function对象的属性
			alert(fun1.length);
			alert(fun2.length);
			alert(fun3.length);
		</script>
	</body>
</html>
